#ifndef __KEY_H
#define __KEY_H

#include <stm32f4xx.h>
#include "sys.h"
#include "led.h"
#include "delay.h"

#define KEY1 PAin(0)
#define KEY2 PEin(2)
#define KEY3 PEin(3)
#define KEY4 PEin(4)

typedef void (*keyDonw_function_ptr)(void);
extern volatile keyDonw_function_ptr key1Down_Handler;
extern volatile keyDonw_function_ptr key2Down_Handler;
extern volatile keyDonw_function_ptr key3Down_Handler;
extern volatile keyDonw_function_ptr key4Down_Handler;

void KEY_EXTI_Init(void);	 // 初始化按键（外部中断）
void ptr_null_function(void);

#endif
